<!DOCTYPE html>
<html class="pixel-ratio-1" style="background-color: #f1f1f1">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
        <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
        <meta name="viewport" content="width=375,user-scalabe=no" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <script src="../../../../../public/vendor/flexible/flexible.js"></script>
        <title>接苗单-新增</title>
        <link rel="stylesheet" type="text/css" href="../../../../../public/vendor/weui/weui.min.css" />
        <link rel="stylesheet" type="text/css" href="../../../../../public/css/common.css" />
        <link rel="stylesheet" type="text/css" href="../../../../../public/css/iconfont/iconfont.css" />
        <link rel="stylesheet" href="../../../../../public/vendor/weui/jquery-weui.css" />
        <link rel="stylesheet" href="../../../../../public/vendor/select2/select2.css" />
        <link rel="stylesheet" href="../../../../../public/themes/base/css/site.css" id="admui-siteStyle" />
        <link rel="stylesheet" href="../../../../../public/css/features/cbs/receivepig/addreceivepig.css" />

        <script id="addsaleorders-template" type="text/x-template">
            {{~ it :value:index}}
            <div class="report-contents-item-box" id="{{=value.seq}}">
                <div class="weui-cell" style="padding: 15px;">
                     <div class="weui-cell__hd"><label class="weui-label">车牌号</label></div>
                     <div class="weui-cell__bd">
                         <div style="text-align:left">{{=value.carNo}}</div>
                     </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">司机姓名</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=value.driverName}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">数量(头)</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=Utils.toThousands(value.count,0)}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">毛重(kg)</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=Utils.toThousands(value.grossWeight,2)}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">皮重(kg)</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=Utils.toThousands(value.tareWeight,2)}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">净重(kg)</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=Utils.toThousands(value.netWeight,2)}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">品种</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=value.pigBreedStr}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">买方损耗数量(头)</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=Utils.toThousands(value.buyLossCount,0)}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">养户</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=value.farmerName ||""}}</div>
                    </div>
                </div>
                <div class="weui-cell" style="padding: 15px;">
                    <div class="weui-cell__hd"><label class="weui-label">养殖批次</label></div>
                    <div class="weui-cell__bd">
                        <div style="text-align:left">{{=value.breedBatchName||""}}</div>
                    </div>
                </div>


                 <div class="weui-cell plantails" style="display: flex;justify-content: space-around;padding:0px" id="operate{{=value.seq}}">
                    <div style="flex:1;text-align:center;border-right: 1px solid #e6e6e6;padding:10px">
                        <div class="operation-button" data-flag="table-click-delete" data-index='{{=value.seq}}'>
                            <i class="icon iconfont icon-linear-delete icon-font-size-24" style="font-size: 24px;color:#e24f2efd"
                               aria-hidden="true"></i>
                        </div>
                    </div>
                    <div style="flex:1;text-align:center;padding:10px">
                        <div class="operation-button" data-flag="table-click-edit" data-index='{{=value.seq}}'>
                            <i class="icon iconfont icon-edit-no-border icon-font-size-24" style="font-size: 24px;color:#fe8636fd"
                               aria-hidden="true"></i>
                        </div>
                    </div>
                </div>
            </div>
            {{~}}
        </script>
    </head>

    <body>
        <div id="main-addsaleorders">
            <form id="addsaleorders-form">
                <div class="weui-cells__group weui-cells__group_form">
                    <p class="saleOrders-message">接苗单信息</p>
                    <div class="report-contents-item-box">
                        <div class="weui-cell weui-cell_select" style="padding: 15px" id="search-date">
                            <div class="weui-cell__hd stycon">
                                <label class="weui-label">
                                    业务日期
                                    <span class="red-900">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" id="businessTime" placeholder="请选择业务日期..." required emptyTips="请选择业务日期" v-model="bizDate" readonly />
                            </div>
                        </div>

                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        公司
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <select class="weui-select clearContent" id="fiOrgUnit" style="visibility: hidden" required></select>
                                </span>
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        服务部
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <select class="weui-select clearContent" id="farmOrg" style="visibility: hidden" required></select>
                                </span>
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        供应商
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <select class="weui-select clearContent" id="supplier" style="visibility: hidden" required style="width: 90%"></select>
                                </span>
                            </div>
                        </div>
                        <div id="inputFarm">
                            <div class="weui-cell" style="padding: 15px">
                                <div class="weui-cell__hd"><label class="weui-label">供方猪场</label></div>
                                <div class="weui-cell__bd">
                                    <input class="weui-input clearContent masterpad" type="text" placeholder="请输入供方猪场..." v-model="farmOrgUnitName" />
                                </div>
                            </div>
                        </div>

                        <div class="weui-cell weui-cell_select" style="padding: 15px; display: none" id="selctFarm">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        供方猪场
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <select class="weui-select clearContent" id="farmName" style="visibility: hidden" required style="width: 90%"></select>
                                </span>
                            </div>
                        </div>
                        <div id="inputbreedBatch">
                            <div class="weui-cell" style="padding: 15px">
                                <div class="weui-cell__hd"><label class="weui-label">供方批次</label></div>
                                <div class="weui-cell__bd">
                                    <input class="weui-input clearContent masterpad" type="text" placeholder="请输入供方批次..." v-model="suppBreedBatchName" />
                                </div>
                            </div>
                        </div>
                        <div class="weui-cell weui-cell_select" style="padding: 15px; display: none" id="selctbreedBatch">
                            <div class="weui-cell_orgs" style="display: -webkit-flex; align-items: center">
                                <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                    <span>
                                        供方批次
                                        <span class="red-900" style="position: absolute">&nbsp;*</span>
                                    </span>
                                </span>
                                <span class="weui-cell__ft">
                                    <select class="weui-select clearContent" id="breedBatch" style="visibility: hidden" required style="width: 90%"></select>
                                </span>
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd">
                                <label class="weui-label">
                                    总价(元)
                                    <span class="red-900" style="position: absolute">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="请输入总价..." v-model="totalPrice" />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd"><label class="weui-label">验收重量 (kg)</label></div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="根据分录计算..." v-model="Utils.toThousands(totalWeight, 2)" disabled />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd"><label class="weui-label">验收数量(头)</label></div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="根据分录计算..." v-model="Utils.toThousands(totalCount, 0)" disabled />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd">
                                <label class="weui-label">
                                    供方总损耗数量(头)
                                    <span class="red-900" style="position: absolute">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="请输入供方总损耗数量..." v-model="totalSuupLossCount" />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd"><label class="weui-label">买方总损耗数量(头)</label></div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="根据分录计算..." v-model="Utils.toThousands(totalBuyLossCount, 0)" disabled />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd"><label class="weui-label">总数量(头)</label></div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="根据分录计算..." v-model="Utils.toThousands(newtotalCount, 0)" disabled />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd">
                                <label class="weui-label">
                                    猪只日龄(天)
                                    <span class="red-900" style="position: absolute">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="请输入猪只日龄..." v-model="entryDays" />
                            </div>
                        </div>
                        <div class="weui-cell" weui-cell_select style="padding: 15px" id="search-intentionCity">
                            <div class="weui-cell__hd">
                                <label class="weui-label">
                                    发货行政区划
                                    <span class="red-900" style="position: absolute">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="shipRegion" type="text" v-model="shipRegion" hidden />
                                <input class="weui-input clearContent masterpad" type="text" placeholder="请选择发货行政区划..." id="intentionCity" />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd">
                                <label class="weui-label">
                                    详细地址
                                    <span class="red-900" style="position: absolute">&nbsp;*</span>
                                </label>
                            </div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" placeholder="请输入详细地址..." v-model="shipAddress" />
                            </div>
                        </div>
                        <div class="weui-cell" style="padding: 15px">
                            <div class="weui-cell__hd"><label class="weui-label">备注</label></div>
                            <div class="weui-cell__bd">
                                <input class="weui-input clearContent masterpad" type="text" id="remark" placeholder="请输入备注..." v-model="remark" />
                            </div>
                        </div>
                    </div>
                </div>
                <p class="saleOrders-message" style="margin-bottom: 0">接苗单分录列表</p>

                <a href="javascript:;" class="weui-btn weui-btn_primary" id="add-saleEntry">新增</a>

                <div id="salesEntry" style="margin-top: 20px"></div>
                <div id="saleplansList"></div>
                <div class="report-contents-item-box operation">
                    <div class="weui-cell operation-child">
                        <a href="javascript:;" class="weui-btn weui-btn_default" style="width: 38%; border-radius: 8px; background-color: #fff; margin-left: 0px" id="returnMain">取消</a>
                        <a href="javascript:;" class="weui-btn weui-btn_primary" style="width: 60%; border-radius: 8px; margin-top: 0px; margin-right: 0px" id="informationSubmit">保存</a>
                    </div>
                </div>
                <div style="height: 1px"></div>
            </form>
            <div id="maskback" class="maskback" style="display: none">
                <div id="unimportmask" class="unimportmask"></div>
                <div class="intentionMask">
                    <div class="firstrowit">
                        <div id="canvalBtn" style="color: grey">取消</div>
                        <div>请选择发货行政区划</div>
                        <div id="determineBtn" style="color: #3e8ef7">确定</div>
                    </div>
                    <div class="secondrowit">
                        <ul id="selectCity">
                            <li class="activeStyle towellipse">
                                <span id="provice" class="innerAddress">请选择</span>
                                <div class="adressId" style="display: none"></div>
                                <div class="uderline underlineit"></div>
                            </li>
                            <li class="towellipse">
                                <span id="city" class="innerAddress"></span>
                                <div class="adressId" style="display: none"></div>
                                <div class="uderline"></div>
                            </li>
                            <li class="towellipse">
                                <span id="district" class="innerAddress"></span>
                                <div class="adressId" style="display: none"></div>
                                <div class="uderline"></div>
                            </li>
                            <li class="towellipse">
                                <span id="street" class="innerAddress"></span>
                                <div class="adressId" style="display: none"></div>
                                <div class="uderline"></div>
                            </li>
                        </ul>
                    </div>
                    <div id="intentionContain" class="intentionContain">
                        <div id="provinceContain"></div>
                        <div id="cityContain"></div>
                        <div id="districtContain"></div>
                        <div id="streetContain"></div>
                    </div>
                </div>
            </div>
        </div>

        <!--底部弹出框-->
        <div id="pop"></div>
        <div class="show-box" style="display: none">
            <div class="title">
                <div class="tit">选择销售计划列表</div>
            </div>
            <hr />
            <div id="saleplans-list" style="overflow: auto; height: 100%"></div>
            <div class="report-contents-item-box" style="background-color: white; border: none; position: fixed; bottom: 0px; width: 100%">
                <div class="weui-cell bottom_btn" id="button-height" style="display: flex; justify-content: space-between; padding: 0px; margin-right: 20px; height: 90px">
                    <a href="javascript:;" class="weui-btn weui-btn_default" style="width: 40%; border-radius: 8px; margin-top: 10px; margin-left: -10px" id="returnAddSaleOrders">取消</a>
                    <a href="javascript:;" class="weui-btn weui-btn_primary" style="width: 55%; border-radius: 8px; margin-top: 10px" id="saleplansSubmit">确定</a>
                </div>
            </div>
        </div>

        <script type="text/javascript" src="../../../../../public/vendor/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/weui/jquery-weui.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/vue/vue.min.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/moment/moment.min.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/weui/weui.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/weui/jquery-weui.min.js"></script>
        <script type="text/javascript" src="../../../../../public/js/common/iosadaptation.js"></script>
        <script type="text/javascript" src="../../../../../public/js/config/utils.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/select2/select2.full.min.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/select2/i18n/zh-CN.js"></script>
        <script type="text/javascript" src="../../../../../public/vendor/form-entries/form-entries.js"></script>
        <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.14&key=657d628d60d09241b068d846b9113dae"></script>
        <script src="https://webapi.amap.com/ui/1.0/main.js"></script>
        <script type="module" src="../../../../../public/js/features/cbs/receivepig/addreceivepig.js"></script>
    </body>
</html>
